Menu

Build a Stories of the Prophets & Sahaba CLI in Rust (serde + ureq, offline cache, 9 languages)
📰

Build a Stories of the Prophets & Sahaba CLI in Rust (serde + ureq, offline cache, 9 languages)

DEV Community: rust·SunnahSource·6 days ago
#1Ng6S6IM
#devtorust#devto#dev#title#json
Long article (2414 words) — no AI summary yet.
Reading 0:00
15s threshold

Rust is a great fit for small, fast command-line tools. In this tutorial we build islamic-stories , a CLI that reads two public JSON samples from SunnahSource :

the Stories of the Prophets API (Qasas al-Anbiya): https://sunnahsource.org/data/json/ambiya.json

the Sahaba API (companions of the Prophet ï·º): https://sunnahsource.org/data/json/sahaba.json

The CLI lists the items, shows one story or biography in any of the 9 languages in the data, falls back to English when a language is missing, and keeps an on-disk cache so it still works offline.

All text the CLI prints comes straight from the JSON. The tutorial does not add any Islamic content of its own.

1. Look at the JSON first

Both files share the same envelope:

{ "title" : "Stories of the Prophets (Ambiya)" , "description" : "Stories of Allah's prophets with translations in 9 languages" , "is_free" : false , "items" : [ ...…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.