Created
May 3, 2012 11:32
-
-
Save chssweb/2585112 to your computer and use it in GitHub Desktop.
IMacro for adding articles to a Polopoly section
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET !DATASOURCE course_list.csv | |
SET !DATASOURCE_COLUMNS 1 | |
SET !LOOP 1 | |
SET !DATASOURCE_LINE {{!LOOP}} | |
SET !VAR1 EVAL("var s =\"{{!COL1}}\";s = s.toLowerCase();s = s.replace(/ /g,\"-\"); s.substring(0,24);") | |
FRAME F=3 | |
TAG POS=1 TYPE=BUTTON ATTR=TXT:Create | |
WAIT SECONDS=1 | |
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:mainform ATTR=ID:work_* CONTENT={{!COL1}} | |
TAG POS=2 TYPE=INPUT:TEXT FORM=NAME:mainform ATTR=ID:work_* CONTENT={{!COL1}} | |
TAG POS=5 TYPE=INPUT:TEXT FORM=NAME:mainform ATTR=ID:work_* CONTENT={{!VAR1}} | |
TAG POS=1 TYPE=SELECT FORM=NAME:mainform ATTR=ID:work_* CONTENT=%discard | |
WAIT SECONDS=1 | |
TAG POS=1 TYPE=BUTTON FORM=NAME:mainform ATTR=TXT:Save<SP>&<SP>Connect | |
WAIT SECONDS=1 | |
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:mainform ATTR=ID:work_* | |
TAG POS=1 TYPE=BUTTON ATTR=TXT:Connect | |
WAIT SECONDS=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For a 2 column csv: Title of page,title-for-friendly | |
use: | |
SET !DATASOURCE course_list.csv | |
SET !DATASOURCE_COLUMNS 2 | |
SET !LOOP 1 | |
SET !DATASOURCE_LINE {{!LOOP}} | |
FRAME F=3 | |
TAG POS=1 TYPE=BUTTON ATTR=TXT:Create | |
WAIT SECONDS=1 | |
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:mainform ATTR=ID:work_* CONTENT={{!COL1}} | |
TAG POS=2 TYPE=INPUT:TEXT FORM=NAME:mainform ATTR=ID:work_* CONTENT={{!COL1}} | |
TAG POS=5 TYPE=INPUT:TEXT FORM=NAME:mainform ATTR=ID:work_* CONTENT={{!COL2}} | |
TAG POS=1 TYPE=SELECT FORM=NAME:mainform ATTR=ID:work_* CONTENT=%discard | |
WAIT SECONDS=1 | |
TAG POS=1 TYPE=BUTTON FORM=NAME:mainform ATTR=TXT:Save<SP>&<SP>Connect | |
WAIT SECONDS=1 | |
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:mainform ATTR=ID:work_* | |
TAG POS=1 TYPE=BUTTON ATTR=TXT:Connect | |
WAIT SECONDS=1 |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Page one | |
Page two | |
Page three | |
Page four |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment