Permalink
Browse files

Update comments and doc about utils/meetups.js.

Signed-off-by: François de Metz <francois@stormz.me>
  • Loading branch information...
1 parent 0a5d5ad commit 49540a1b1e4e6117f06202141bfbc1b7c15b4d1f @francois2metz francois2metz committed Feb 18, 2012
Showing with 21 additions and 13 deletions.
  1. +2 −10 README.md
  2. +19 −3 utils/meetups.js
View
@@ -4,17 +4,9 @@ This is the source of the parisjs.org website.
## Utils
-Before everything else:
+The list of meetups and talks is very long. If you want to update the HTML, the easiest way is to use a script located in utils/meetups.js
- npm install
-
-### Parsing all meetups and talks
-
- node utils/meetups.js parse
-
-### Writing all meetups
-
- node utils/meetups.js update
+Read comments on top of the script for more details.
## License
View
@@ -4,14 +4,30 @@
*
* It's a two way parser:
* - read index.html and extract the list of events/talks/people and output JSON on stdout
- * - read a JSON from stdin and update index.html
+ * - read a JSON from stdin and output the new HTML on stdout
+ *
+ * Dependencies:
+ * * node
+ * * npm (bundled with node \o/)
+ *
+ * Install deps: npm install
*
* Why JSON?
* Because there is no good yaml parser in javascript, and it was out of the scope for now
*
* How to use it?
- * node utils/meetups.js parse > meetup.json
- * node utils/meetups.js update < meetup.json
+ * node utils/meetups.js parse > meetups.json
+ * node utils/meetups.js update < meetups.json
+ *
+ * Example:
+ * You want to update the HTML of all talks
+ * 1. Parse meetups and export to json
+ * node utils/meetups.js parse > meetups.json
+ * 2. edit utils/template_meetup.html and update it (the hard part)
+ * 3. Generate the new html of the page
+ * node utils/meetups.js update < meetups.json > index2.html
+ * 4. Move the generated HTML to index.html
+ * mv index2.html index.html
*/
var jsdom = require('jsdom')

0 comments on commit 49540a1

Please sign in to comment.