-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standard format for planet_feeds.txt #1528
Comments
@patricoferris I would like to work on this :) |
This is an opportunity to get familiar with ocaml indept. @patricoferris If it's not assigned to anyone I'd like to give it a try |
@mahakbansal2019 is currently assigned, are you still working on this @mahakbansal2019? |
No @patricoferris! |
Okay thanks |
@mercybassey Are you still working on it? Do you need any help? :) |
@gs0510 I tried requiring the package as shown in the ezjsonm readme but it didn't work , so I'm still not sure how to get it to work |
Hello @patricoferris @gs0510. Since I am not yet familiar with the ezjsonm package I tried a different approach in converting the text file to JSON. All i did was to setup a node project, and used a library called text-to-json for the parsing. I installed the package via npm and required it. I'd like to know your take on this and also like to know if using the ezjsonm package follow the same approach. If not i will like to have a guide. |
Hi @mercybassey, Nice work so far, unfortunately I don't think we're going to add all of Node as another dependency. However, this is actually a really useful stepping stone that you can use. I think the goals have been a little mixed up. This issue seeks to (a) convert the text document to JSON like you did with the Node project and save it to a file ( A small example:
Then (ignore the escaping of double-quotes): utop # let json = "[ { \"url\": \"https://ocaml.org\" } ]";;
val json : string = "[ { \"url\": \"https://ocaml.org\" } ]"
utop # let ez = Ezjsonm.value_from_string json;;
Ezjsonm.value = `A [`O [("url", `String "https://ocaml.org")]] |
Currently when generating https://ocaml.org/community/planet/ the planet_feeds.txt is read in order to get the name and the RSS feed URL, the format of that file seems a little arbitrary (or perhaps was made before all of the nice JSON/Yaml/S-expression tools we now have were created!).
For ease of sharing this information, extending the information (e.g. adding descriptions), porting it elsewhere and maintainability I think we should convert
planet_feeds.txt
to JSON.As far as I can tell, we already transitively depend on
ezjsonm
because we depend on COW so this would be a good library to use for the parsing (we will still add it to the.opam
file but it won't change the amount of things we pull in which is a nice bonus).The text was updated successfully, but these errors were encountered: