/travelguide

Offline GuideWithMe travel guides based on Wikivoyage articles.

Primary LanguageJavaApache License 2.0Apache-2.0

Welcome to Offline Travel Guides based on Wikivoyage open data!

You can check live guides here: http://guidewithme.com/

Basic setup

All guides apps need pre-built data, which is taken from Wikivoyage project. Please check out scripts in builder folder to understand how to do it, now they're lacking any documentation.

NOTE: Guides were never built on Windows. If you manage to do it, please share a pull request with your fixes.

For Android, create android/local.properties file with content:

sdk.dir=/full/path/to/android-sdk
ndk.dir=/full/path/to/android-ndk

You also need to clone MAPS.ME android api repo (don't forget to update it if already cloned): cd android/3rdparty; git clone git@github.com:mapsme/api-android.git

To generate search indexes for guides you need to pre-build genindex binary. If you already have qmake installed, Go to builder/genindex and run: qmake genindex.pro; make

P.S. If you can contribute clean Makefile without qmake, you are always welcome!

How to build guide for a new country

To add new country to generation list please follow next steps:

  1. Add country's name from file all_countries.txt to file countries_to_generate.txt
  2. Add default image for this country into the folder default_images this image will be used for articles which don't have image (or we dont have image for them). It's name must be <country_name>.jpg.
  3. Remove file process_html if exists to update data.

Now you'r ready to build new amazing guides with me!

  • run bash build.sh to prepare data for guides and Android obb files.

iOS - add new country

  1. Duplicate any existing iOS target and give it a name of new country
  2. Delete copy of plist which was created by XCode
  3. Some target's proj settings are set to default values and should be fixed/set equal to other targets
  4. Set PRODUCT_NAME in target project properties equal to a name of new country
  5. Set BUNDLE_ID in target properties to com.guidewithme.newcountry (all lowercase, dots instead of spaces)
  6. Set URL_SCHEME in target properties to guidewithme-newcountry (all lowercase)
  7. Add all necessary app icons to the corresponding folder
  8. Fix "target membership" for icons and for data folder in resources for original target which was duplicated
  9. Drag "../builder/wikivoyage/Countries//content/data" folder to the Resources and create folder reference
  10. Add new target name to iOS/build.sh to use Jenkins autobuild

To build new guide locally from XCode, you should copy guide data generated by builder to iOS/Countries/New_Country folder. In this folder there is content/data folder with *.html files, css, js, images and thumb subfolders

Android notes

IMPORTANT

  • Don't forget to edit file android/src/com/guidewithme/expansion/KeyMap.java Please add Google Play public license key at the end of the COUTRY_2_KEY map AND increment KEY_COUNT constant.
  • Add icons for every resolution to android/icons/CountryName/

There is one script you need to use to build guides for Android: build-with-android.sh. It places it's result (obb, apk) into countries folder Countries/<country_name>.

Android applications have package name made of lowercased country name and underscores replaced with dots, added to "com.guidewithme.". For instance: United_States -> com.guidewithme.united.states

United_Kingdom hack

We have package name "com.guidewithme.uk" for it for the sake compatibility with first release. obb and apk files are generated accordingly.