Skip to first unread message

Nicola Imperati

unread,
Jul 8, 2019, 1:26:15 PM7/8/19
to MIT App Inventor Forum
Salve,
nella mia app ho inserito diverse Table Arrangement che inizialmente sono tutte impostate su Visible = False. Però aprendo delle Table Arrangement successive, mi capita che anche le  le precedenti vengono visualizzate perchè sono diventate nel frattempo Visible = True. Come fare a passare alla Table Arrangement successiva e far chiudere quella precedente e viceversa?
Grazie 
Nicola

Chris Ward

unread,
Jul 8, 2019, 2:17:51 PM7/8/19
to MIT App Inventor Forum
Hello Nicola

How do you open a Table Arrangement - via List View / List Picker or a set of buttons?

Chris Ward

unread,
Jul 8, 2019, 2:27:58 PM7/8/19
to MIT App Inventor Forum
Hi again

The fastest way, each time a different table is to be displayed, is to first hide all tables.

For example, if my App has 8 Table Arrangements and, say, Table Arrangement 3 is currently displayed and I now wish to display Table Arrangement 4:

Display one table arrangement.png


Nicola Imperati

unread,
Jul 8, 2019, 4:08:36 PM7/8/19
to MIT App Inventor Forum
Ciao Chris,
ti ringrazio per il tuo utilissimo consiglio; ne farò buon uso.

Nicola

Nicola Imperati

unread,
Jul 15, 2019, 5:07:45 PM7/15/19
to MIT App Inventor Forum
Ciao Chris,
ho iniziato a seguire il tuo consiglio; ma dopo aver raggiunto circa 1700 blocchi e terminato l'ottavo libro; ho iniziato a visualizzare alcuni errori.
Come puoi vedere dal file AIA, i libri totali sono 73; e suppongo che per questa mia app ci sarebbe bisogno di utilizzare un file CSV.
Ma è troppo complesso per me..aiuto :-(
Grazie

Nicola 

Sacra_Bibbia_Mod.aia

Chris Ward

unread,
Jul 15, 2019, 8:06:52 PM7/15/19
to MIT App Inventor Forum
Hi Nicola

Well, I'm getting a Server error: "could not upload project". Not sure if it's your file or an issue with the MIT Server. Can you reduce the size of the Project file? Say half (4 books)?

If you are seeing errors @ 8 books and your target is 73 books, we do need to study your data and how the code can be designed to handle it.

Nicola Imperati

unread,
Jul 16, 2019, 10:50:21 AM7/16/19
to MIT App Inventor Forum
Ciao Chris,
il progetto completo di tutti e 8 libri raggiunge 379 Kb ed io per questo ho già provveduto a ridurre la dimensione del Progetto a soli 89 Kb che corrispondono a un solo libro; e questo è proprio il file AIA che ti ho allegato.
Grazie
Nicola

Chris Ward

unread,
Jul 16, 2019, 4:46:21 PM7/16/19
to MIT App Inventor Forum
Hi Nicola

I am sorry, I did not check the file size. So there must have been a temporary fault with the MIT Server as I have just loaded the file without problems. 

Chris Ward

unread,
Jul 16, 2019, 5:52:08 PM7/16/19
to MIT App Inventor Forum
Hi Nicola

There are two challenges to overcome:

1) Too many Buttons and Events
2) Huge amounts of text

Solutions
1) Instead of Buttons in Table Arrangements, we can use Active Cells in local HTML Tables, hosted by a Web Viewer.
2) Instead of a huge number of text blocks, we can have text files. However, the End User would need to download them, their size would probably be too big to be within the App as Media Assets.

Schema

LargeData.png




Ghica

unread,
Jul 17, 2019, 9:39:39 AM7/17/19
to MIT App Inventor Forum
Ciao Nicola,
To make your app much simpler, indeed put the text in text files and load them as assets. Just make the files and calculate the totaal size. If necessary, zip them first. If the total text size plus the .aia size is not more than 10MB, you could just load the files as assets, otherwise you could provide a Google drive and load them dynamically as needed. 
If you put all text withing the app itself, maintenance will be horrible!
To make the whole table arrangement and all its included components invisible, you just have to set the arrangement to invisible. Very simple!
Cheers, Ghica.

SteveJG

unread,
Jul 17, 2019, 11:13:19 AM7/17/19
to mitappinv...@googlegroups.com
Your Project aia  loaded ok here Nicola.

The amount of text involved in the Bible is not a significant issue Nicola despite what others have noted in this discussion. A small tutorial shows the amount of text is not the problem.  The example in the followin link shows a way to create an eBook (essentially what you are attempting) using either text files or html files  https://groups.google.com/forum/#!topic/mitappinventortest/0ECpp3khHss/discussion .   The amount of text is not an issue.  One can stuff a 350 page book easily into a Label with no trouble at all.  The  issue App Inventor has is the number of files (text or html) that you can load into App Inventor 2 easily is limited. Too many files and the server times out before loading all the files.  If you have lots of files, as you are attempting to work with, the server at  http://code.appinventor.mit.edu is a better choice than using the main App Inventor 2 server.  The main server times out attempting to load dozens of files.   


Attached is an app aia that shows an html Bible using a ListPicker and simplified controls.  The aia needs to run/compile on the code.app inventor server .  The example contains the New Testament.  It will not load on the main server. If I include the Old Testament html files, the project refuses to load.  Too many individual files. around is to provide a New Testament and and Old Testament version of your app.Be patient, the aia takes about a minute to load.  For best results,when you run the aia using Companion, check the Use Legacy  Connection box on the Companion screen.  Edit: original aia was replaced with version 4 to correct a small error and to provide the Blocks necessary to compile (make an apk).  The Blocks necessary to compile are grayed out.  The existing Blocks run in the Companion.  Enable the grayed out blocks and disable the corresponding blocks.  To provide the correct links to the htm files, this uri path is required using the Companion   file:///mnt/sdcard/AppInventor/assets/index2.html  , when you compile, change all instances of that to   file:///android_asset/index2.html


ListPicker.jpg


NewTetstementapp.jpg



The html files included in the example are public domain.  They were obtained from http://bibledatabase.org/   . Unfortunately, they do not have the html files in Italian although they do have several other languages.    Build a separate version for the Old and New Testaments if you use this technique and you should be able to load the Old Testament too.



Here is a version of the Bible in Italian in html format  http://www.vatican.va/archive/ITA0001/_INDEX.HTM  You might be able to copy the individual html files and create a similar app to the one described above.

Hope something is helpful.   Good luck with your Project.  Also, heed other poster's suggestions.   You can make your eBook as you are, but it will be painful.

Regards,
Steve
BibleNew4.aia

Chris Ward

unread,
Jul 17, 2019, 11:13:36 AM7/17/19
to MIT App Inventor Forum
Hi Ghica

Your advice is sound for a regular project - my advice was similar -you didn't read it? However, the project is an absolute heavy weight, you can't have 73 Table Arrangements each with approx 50 buttons. The final amount of text required is an issue too - hence my Schema to make the App as light as a feather and efficient.

Nicola Imperati

unread,
Jul 17, 2019, 11:40:38 AM7/17/19
to MIT App Inventor Forum
Ciao Steve,
purtroppo il server del MIT non riesce a caricare il file AIA e mi da errore; ti ringrazio ugualmente.
Nicola

Ghica

unread,
Jul 17, 2019, 11:41:02 AM7/17/19
to MIT App Inventor Forum
Povero Nicola!
As always Steve is right. And I did not read Chris' stuff well enough. 

My expertise is making a Quran for a forum poster though. Shorter than the Bible, but Arabic has its challenges. In addition to text the app had sound and sentence highlighting. Individual text and sound files were on a Google drive and there were CSV files pointing to them.
Items were chosen using listpickers and a slider.

If you want to make an ebook, why would you want to make an App Inventor app? There is surely one available? Also in Italian?
Maybe you can explain the purpose of your app a bit better, in order to give better advice.
Cheers, Ghica.

SteveJG

unread,
Jul 17, 2019, 11:46:07 AM7/17/19
to MIT App Inventor Forum
@Nicola ... did you use the main MIT App Inventor 2 server or this one   http://code.appinventor.mit.edu .   The aia will onlly load on the link server.

--Steve

Chris Ward

unread,
Jul 17, 2019, 2:10:52 PM7/17/19
to MIT App Inventor Forum
@SteveJG

The amount of text involved in the Bible is not a significant issue Nicola despite what others have noted in this discussion

It is significant because Nicola is trying to use a text block for each text item. That's 3650 text blocks (73 Table Arrangements x 50 Buttons each and 50 Text Blocks each). Each Text Block contains around 3000 characters (nearly impossible to edit). It's that tedious approach and the shear number of text blocks that make it an issue. As Nicola discovered, it's already an issue @ 8 Table Arrangements.

Nicola Imperati

unread,
Jul 17, 2019, 5:10:12 PM7/17/19
to MIT App Inventor Forum
Ciao Steve,
innanzitutto colgo l'occasione nel ringraziare anche Chris e Ghica per il loro preziosissimo supporto; e in questo momento mi sto rendendo conto che mi sono imbattuto in un progetto molto grande e complesso. 
Comunque sono riuscito a caricare il tuo file AIA tramite il server di supporto del MIT  e quindi ti chiedo come è possibile creare un unico file HTML dal sito:
http://www.vatican.va/archive/ITA0001/_INDEX.HTM. Infatti ho visto che tu per il solo Nuovo Testamento, hai creato il file Index2.html.
Grazie
Nicola

SteveJG

unread,
Jul 17, 2019, 6:11:28 PM7/17/19
to mitappinv...@googlegroups.com
Oh creating a single html from that site I expect might be  painful and difficult.

1) You have to learn how to use an html compiler although this can be done with a text editor by  someone who knows what they are doing.

2) You might write the Vatican...they might have these already as a single html.

3) if not, you can do the following for EACH of the web sites html files to extract the html code.  Sorry, this activity is drudgery.but you asked.

Bible1.PNG


then using a Chrome browser; right click on that page to bring up a MENU ...   select    View page source     (Ctrl + U) and  the following screen will display

Bible2.PNG

This is the start of numerous Genesis html file links..  Now right click on  __P1.HTM   (highlighted as a 2). Clicking will bring you to this page 

Bible3.PNG

...and you see displayed the first book in Genesis .   You want the html that displays that .. Right click the screen and bring up the MENU again and select    View page source     (Ctrl + U) You should then see the first html file of this version of the Bible.  

Bible4.PNG

This is the html source for the pretty Genesis 1 display above.   Copy it all as a text file and save it as Genesis1.htm   You can view it in your WebViewer  (see the initial link I provided earlier for an example of the technique showing how to make eBooks).  

Unedited, the html looks like this viewed on the WebViewer

genesisone.jpg



See the genesis aia.

 Now, keep repeating for the rest of the books.... that is a lot of work.   Then save separate html files and link them or combine them into a single html.  Be aware,
my experience is all the New Testament will compile in App Inventor when used as separate html files but the Old Testament will not compile as AI cannot handle that many files.

Attached is a King James bible in English with all the books consolidated as a single html file (see the attached aia.)  The app is made from the files from here https://www.gutenberg.org/ebooks/10  Theoretically, you should be able to create a lot of individual html files or be able to consolidate them into a single html as show in the eBook example.   Merging the individual files is possible.  It would be time consuming and difficult to create something similar in Italian. Realistically, all the Old Testament files saved as multiple html files is not practical.  However, a single HTML with all the Books works fine!

5) Make you own huge html file using one of the free html compilers.   You need to learn a lot about html to do it. This is the opensource html editor I have used in the past  https://www.google.com/search?q=kompozer&oq=kompozer&aqs=chrome..69i57j69i60.10191j0j9&sourceid=chrome&ie=UTF-8  It is not easy to use but is very helpful making your own html.

6) The easiest way is to just use your WebViewer and point to the  www.vatican.va/archive/ITA0001/_INDEX.HTM  url and use it to view the Bible online.


-- Steve














KingJameshtml .aia
GenesisHTML.aia

Nicola Imperati

unread,
Jul 18, 2019, 11:36:21 AM7/18/19
to MIT App Inventor Forum
Ciao Steve,
tanti anni fa sono riuscito a creare un programma sulla Sacra Bibbia, e come linguaggio di programmazione; ho usato il Visual Basic 6.0 che girava sotto Windows XP. E dato che questo linguaggio era prettamente testuale; era stato semplice incollare tutte le parti di testo che componevano tutti i 73 libri della Sacra Bibbia, all'interno dell'ambiente Visual Basic 6.0.  Ma con Mit App Inventor le cose sono molto più complesse; quindi penso che seguirò il tuo consiglio di usare semplicemente un WebView che si colleghi al sito, anche se a me avrebbe fatto più piacere di poter creare un'app da zero.
Grazie 
Nicola 

Nicola Imperati

unread,
Jul 19, 2019, 10:53:34 AM7/19/19
to MIT App Inventor Forum
Ciao Chris,
mi potresti spiegare meglio le tue due soluzioni? E cosa intendi con "celle attive nelle tabelle HTML locali"?
Sinceramente se nella mia app devo inserirci solamente una WebViewer da cui parte un collegamento diretto ad una Bibbia Online; allora all'utente finale non serve a nulla scaricare la mia app; ma gli basta salvarsi nei preferiti del Browser, direttamente la pagina del sito in questione.
Grazie 
Nicola

SteveJG

unread,
Jul 19, 2019, 12:46:34 PM7/19/19
to mitappinv...@googlegroups.com
Here is #7

7) Use the English language html at https://www.gutenberg.org/ebooks/10 as a base.  Load the html into Kompozer, then modify the English, line by line to Italian.
Something like:

ItalianibleKomposer.PNG

Komposer             Vatican site


(simply copy text on the Vatican site and drag it and drop it in the editor (Komposer)

ItalianbibleKomposer2.PNG


                                                                                          Partially translated .

Then save the result as an htm file.  A developer has to be very careful while dragging/dropping .   I would always keep a copy after every 10 or so changes so that if you accidentally corrupt the htm you can recover

Using Komposer or another editor will allow you to create a very large HTML file from the English language htm that will load into Media.  You can call  the file using the WebVIewer.   No Internet connection is required.

This technique should be very simple as the html internal links are preserved.  However, it will be a lot of work dragging and dropping.  Once you learn html and how to use the editor, you could use a ListPicker to pick the Bible Books and versus by providing additional coding.  That is what the first aia Project I posted does.   First  translate the English to Italian.   Since this is a huge html, make sure you keep constant back up copies should you chose to go this programming route.

Clicking on the appropriate link on the first part of the htm will take a user to the Book 

italianBiblehtml.PNG


Click on Genesi .  It takes you to the Genesi Book html entries.   I did the first nine verses   1:1 to 1:9  for you as shown in the attached partially translated ItalianBible file.

If you do all this, you create a stand alone App Inventor 2 app that uses an html file as a Media resource.  

This is an alternative to providing all your already prepared text file while using the File control.  Doing that works for the New Testament.  There are TOO MANY files in the Old Testament to load all them in the same app.

Regards,
Steve




ItalianBible.html

Nicola Imperati

unread,
Jul 19, 2019, 1:42:13 PM7/19/19
to MIT App Inventor Forum
Ciao Steve,
ti ringrazio per il tuo consiglio e penso che mi dovrò rimboccare le maniche perchè ci sarà parecchio lavoro da fare per tradurre dall'inglese all'italiano.
Però tutti noi programmatori abbiamo il grande pregio di avere tantissima pazienza; difatti questo mestiere non è per tutti :-)
Grazie
Saluti
Nicola

SteveJG

unread,
Jul 19, 2019, 5:28:45 PM7/19/19
to MIT App Inventor Forum
:)   the translation is already done for you!  Copy the Book and verse text from the Web Bible and replace the English text in the html with the corresponding Italian text.

Good luck.  It is a worthwhile project.

Chris Ward

unread,
Jul 19, 2019, 5:40:32 PM7/19/19
to mitappinv...@googlegroups.com
Hi Nicola

The solution is simple in two ways:
1) The App is easy to use, just as you originally designed it;
2) It's easier to develop because you can recycle your VB text and the HTML table is a template - so most of the work to make the HTML could be using find - replace in a text editor.

There would be a huge amount of tiny text files - one for each text, but easier to create I think, compared to trying to use Text Blocks in App Inventor. Especially if you can automate some of the work with a macro.

All files are loaded "on demand" so the App is always small, fast and responsive.

This is the HTML version of your Main Menu (two screenshots to show scroll down), the sub menu, the text:

Screenshots.png


The HTML table cells look and behave like buttons. You can easily define the style. Screenshots from a Samsung s8.
Right-mouse click on the image above and select "open image in new tab" to see it full scale/zoom able

Edit: Replaced the image, top shot was not the correct one.

Nicola Imperati

unread,
Jul 20, 2019, 5:58:24 PM7/20/19
to MIT App Inventor Forum
Ciao Chris,
purtroppo non posso più riciclare il mio vecchio testo Visual Basic perchè i DVD MSDN di Visual Basic compreso le sue librerie giravano sotto Windows XP ed io purtroppo sono anni che non lo uso più; quindi sono file inutilizzabili.
E purtroppo non conosco il linguaggio HTML.
Saluti
Nicola

Chris Ward

unread,
Jul 20, 2019, 6:37:54 PM7/20/19
to mitappinv...@googlegroups.com
Hi Nicola

I can't remember the format used by VB but it there is a strong possibility it is plain text for the code - so if you have the files, you could try viewing them in a text editor. Failing that, you should still be able to run the XP version of VB under Windows 7 or 10, just right-click it's desktop icon, select compatibility, "run this program in compatibility mode for Windows XP".

Concerning HTML, there is nothing much to learn because the HTML files for your app are mostly the same (some with more buttons, some with less, right?) So the HTML files I have already made can be used as templates. For example, Book Genesi. The HTML looks like this, in a simple text editor:

HTML Table Code.png


Mostly, to create the HTML file for 'Esodo', you would simple use Find & Replace (to replace 'Genesi ').


If you need more rows of 'buttons' or less rows, you can copy-paste or delete line - as simple as that. In fact, HTML (and it's decoration partner CSS) is so easy that I think you will find you can understand most of the code in the file straight away.


Food for thought - only you can decide what you want to do :)



TimAI2

unread,
Jul 21, 2019, 6:59:06 AM7/21/19
to mitappinv...@googlegroups.com
Nicola

Thought I might come in with my approach to this, which works in a similar way to the work we did with your web cams of Italy project

The app is very lightweight, no assets, no webviewer, just a couple of web components, listviews and labels. It is using a precompiled csv from a google sheet, and scrapes the verses directly from the Vatican's website. With heavy usage, the Vatican may start to get upset about all the web scraping, in which case you may have to use your own text/html files hosted on line, but the approach would be the same. By using a label with htmlFormat ticked, we retain some of the  html structure from the original site after scraping.

Here is a Video of the app in action

The google sheet, shared as "Anyone with the Link", is a flat file database of the books, the chapters, the web page name, and I have added a unique reference for each chapter, which could be used later for cross referencing, and this helps to identify Old and New testaments. I have only done the first four books....

sheetbibbia.png


The blocks load the google sheet csv to the first listview, providing the book names. When a book is selected, the chapters for that book are displayed in the second listview. When a chapter is selected, the requried web page is scraped, and then displayed in the htmlFormat label


blockssacrebibbia.png



sacrebibbia.webm
SacreBibbiaItaliano.aia

Nicola Imperati

unread,
Jul 21, 2019, 4:27:50 PM7/21/19
to MIT App Inventor Forum
Ciao Chris,
ti ringrazio per la tua gentilezza e disponibilità nei miei riguardi e colgo l'occasione nell'augurati una buona serata.
Saluti
Nicola

Nicola Imperati

unread,
Jul 21, 2019, 5:04:20 PM7/21/19
to MIT App Inventor Forum
Ciao Tim,
immettendo nel browser l'url del tuo foglio di google, viene eseguito il download del file sheet3.csv. Ma come posso invece modificarlo direttamente online?
Grazie
Saluti
Nicola

TimAI2

unread,
Jul 21, 2019, 6:12:49 PM7/21/19
to MIT App Inventor Forum
Here is the link to the google sheet (the ID is actually in the blocks, along with the gid !!)


Make a copy, so that the copy is then owned by you, change the ID and GID as required in your aia project
The other sheet, Sheet1, contains an html import of the vatican site, and the source, to identify the pages

You will see I have also added Roman Numerals for the chapters, for fun :)   (Google Sheets has a roman() function that converts arabic numbers to roman numerals)

Nicola Imperati

unread,
Jul 22, 2019, 10:24:15 AM7/22/19
to MIT App Inventor Forum
Ciao Tim,
ho provveduto a fare una copia e poi ho modificato l'ID e il GID nel progetto AIA; ma quando provo a collegarmi con il Companion, visualizzo questo errore:

Cannot parse text argument to "list from csv table" as a CSV-formatted table

Saluti
Nicola

blocks.png

TimAI2

unread,
Jul 22, 2019, 11:43:01 AM7/22/19
to MIT App Inventor Forum
Look at how the web url is constructed to call down the csv data in my example above, quite different from just the link to the google sheet !!

You need to use the sheet ID twice because of the GID element of the url

Nicola Imperati

unread,
Jul 22, 2019, 2:00:10 PM7/22/19
to MIT App Inventor Forum
Ciao Tim, 
nonostante la modifica, mi da lo stesso errore.
Saluti
Nicola
blocks.png

TimAI2

unread,
Jul 22, 2019, 2:22:59 PM7/22/19
to MIT App Inventor Forum
You are still using the link to view the spreadsheet, not the File ID and the GID ID and the required syntax as in my example above

Like this, but your SheetID and GID will be different!!

blocksbuildweburlforcsv.png


Nicola Imperati

unread,
Jul 22, 2019, 3:50:50 PM7/22/19
to MIT App Inventor Forum
Non capisco dov'è che sbaglio :(
blocks.png
blocks (1).png
blocks (2).png

TimAI2

unread,
Jul 22, 2019, 5:32:55 PM7/22/19
to MIT App Inventor Forum
You need to carefully read my example / instructions / images!

wrong syntax:

wrongblocksbuildweburlforcsv.png


correct syntax:


rightblocksbuildweburlforcsv.png



Nicola Imperati

unread,
Jul 23, 2019, 9:25:28 AM7/23/19
to MIT App Inventor Forum
Ciao Tim,
sono perplesso!!
Saluti
Nicola
Immagine.png

TimAI2

unread,
Jul 23, 2019, 9:51:40 AM7/23/19
to MIT App Inventor Forum
You have a "/" (backslash without the quote marks) at the end of your SheetID, remove it ! 

Nicola Imperati

unread,
Jul 23, 2019, 10:12:51 AM7/23/19
to MIT App Inventor Forum
Ho rimosso la barra rovescia alla fine di SheetID, ma l'errore rimane.
Immagine.png

TimAI2

unread,
Jul 23, 2019, 10:23:30 AM7/23/19
to MIT App Inventor Forum
You are using the GID from my spreadsheet, not yours, this could be the problem !!

Nicola Imperati

unread,
Jul 23, 2019, 10:33:49 AM7/23/19
to MIT App Inventor Forum

TimAI2

unread,
Jul 23, 2019, 11:15:23 AM7/23/19
to MIT App Inventor Forum
Share your spreadsheet to "Anyone with the Link" can view. Your app will not be able to access it otherwise

Nicola Imperati

unread,
Jul 23, 2019, 12:14:08 PM7/23/19
to MIT App Inventor Forum
Ciao Tim,
dopo aver impostato su chiunque abbia il link, riesco ad accedere al foglio di calcolo. A questo punto ho iniziato a controllare i collegamenti interconnessi tra i libri, i capitoli e le relative pagine sul sito del Vaticano; e fino al libro dei Numeri tutto bene. Ma dal libro del Deuteronomio, ha cominciato a sbagliare le corrispondenze con i capitoli; e dal libro di Rut invece ha iniziato a visualizzarmi un errore.
Ti posto di seguito gli allegati
Screenshot_2019-07-23-17-51-05.png
Screenshot_2019-07-23-17-51-24.png
Screenshot_2019-07-23-17-51-45.png
Immagine.png

TimAI2

unread,
Jul 23, 2019, 12:34:11 PM7/23/19
to mitappinv...@googlegroups.com
It is not as easy as just dragging down the numbers for the pages, the Vatican have adopted a strange page naming method.

You have to use sheet1 of the spreadsheet, select the cell in column B that relates to the book you want. Drag down the content view at the top, then you can see the cell contents
You will see each page and the chapter number it relates to, I have highlighted some to show you what to look for. Plenty of work ahead !

bibbialinks.png


Nicola Imperati

unread,
Jul 23, 2019, 6:45:19 PM7/23/19
to MIT App Inventor Forum
Ciao Tim,
ero troppo bello trascinare i numeri per le pagine, ma invece ha proprio ragione; c'è un lavoro bestiale da fare!!!
Comunque a occhio e croce penso che ci vorranno almeno 2 mesi.:-( però noi programmatori abbiamo tanta pazienza!!!
Grazie per tutto l'aiuto che mi hai dato.
Saluti
Nicola

TimAI2

unread,
Jul 23, 2019, 7:00:09 PM7/23/19
to MIT App Inventor Forum
As previously mentioned, and for futureproofing, it may be in your best interest to download each page from the Vatican site and host them yourself.
More work but then you have complete control.

SteveJG

unread,
Jul 23, 2019, 7:31:39 PM7/23/19
to MIT App Inventor Forum
@  Nicola .... are you aware the Vatican Web page is copyrighted?  Copyright © Conferenza Episcopale Italiana  .   In most places, that something is copyrighted means developers are restricted in how they may use the data.  Generally, no problems if the data is for personal use possibly but if you intend to post an app on GooglePlay, you need to be aware of what is allowed if material is copyrighted.  Using the WebVIewer in your app and linking it to the actual Web pages may be a better solution.   Tim's interesting way to scrape the web pages still means your app must access the Internet.  Consider why you want to use GoogleDrive (requiring the Internet) and then scrape the online Web page merely  to reproduce the Vatican web and risk violating the copyright.

@ Tim ... host them yourself.???  the web pages?  That might not be allowed, the pages are copyrighted.




TimAI2

unread,
Jul 24, 2019, 3:31:58 AM7/24/19
to MIT App Inventor Forum
Looks like I will be damned for eternity and cast into the fire pits of hell !  (Actually it has been that hot here the last couple of days :) )

The google sheet simply serves as a csv builder. Once this is done, the csv file could be loaded as an asset, and updated via the internet if necessary

The app doesn't need all the page functionality, some of the htmlformat does help though, we could use the scrape method provided to grab what is needed, or build own pages from another text.
I assume the layout and non Bible content is the copyrighted part, as far as I am aware, the bible text is in the public domain, and difficult to claim copyright on "<br<br>" ?

Project Gutenburg hold a copyright free version of the KJV Bible in html or text, this could be run through a translator  (https://www.gutenberg.org/files/10/10-h/10-h.htm). If PC is set to default Italian language, Chrome will translate the text


I will now be super analytical of anything posted here, by anyone, that is or could be considered to be copyrighted material

Ghica

unread,
Jul 25, 2019, 3:28:21 AM7/25/19
to MIT App Inventor Forum
I used Google translate quite a lot to speed up my work for my class of Italian, but the results are mixed and I did have to do a lot of rework.
Translating English to Italian using Google translate will give you terrible results. Using it for ordering coffee is fine, but a holy text? Where a group of scholars pondered every word before it got into some specific edition of the Bible, no way.
Cheers, Ghica.

TimAI2

unread,
Jul 25, 2019, 3:56:25 AM7/25/19
to MIT App Inventor Forum
Yes I am aware of that. It is probably easier to find an italian version, most likely by searching from an Italian based PC

Nicola Imperati

unread,
Jul 25, 2019, 9:59:27 AM7/25/19
to MIT App Inventor Forum
Ciao Ghica,
hai perfettamente ragione, difatti io che frequento da 10 anni una Comunità Cattolica di preghiera; non mi sarei mai permesso di tradurre la Sacra Bibbia con Google Translate, difatti su queste cose non si scherza.
Saluti
Nicola

Nicola Imperati

unread,
Jul 25, 2019, 10:11:37 AM7/25/19
to MIT App Inventor Forum
Ciao Tim,
ma se io sto usando il foglio di Google semplicemente come costruttore di CSV a cui vengono richiamate direttamente le pagine richieste dal sito del Vaticano; allora giustamente io accedo in modalità di sola lettura e quindi per l'utente finale non sarà possibile poter effettuare nessuna operazione di modifica sul testo come copia e incolla, giusto?
Saluti
Nicola

TimAI2

unread,
Jul 25, 2019, 10:21:44 AM7/25/19
to MIT App Inventor Forum
If they have the file ID, they would be able to view the spreadsheet and make a copy of it, but not edit your spreadsheet or break your app.

If you want to keep it private then:

Nicola Imperati

unread,
Jul 25, 2019, 10:36:02 AM7/25/19
to MIT App Inventor Forum
Ciao Tim,
grazie mille per i tuoi saggi consigli.
Saluti
Nicola

Nicola Imperati

unread,
Jul 28, 2019, 4:56:55 PM7/28/19
to MIT App Inventor Forum
Ciao Tim, 
sto procedendo a fare la mia app, e quando vado a fare i miei controlli funziona bene; a parte che ogni tanto mi compare il seguente errore, quando clicco su qualche capitolo:

 Select list item: Attempt to get item number 2 of a list of length 1: (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html><!-- 20031105 --> <head> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><META name="ROBOTS" content="NONE"> <META name="GENERATOR" content="IntraText Digital Library - Eulogos"> <meta name="creator" content="Copyright &copy; Conferenza Episcopale Italiana" /> <meta name="subject" content="La Sacra Scrittura, Bibbia" /> <meta name="date.created" content="" /> <meta name="date.issued" content="20031105" /> <meta name="date.expires" content="20031205" /> <meta name="part" content="Romani &gt; 8" /> <meta name="language" content="it" /> <meta name="publisher" content="Internet Office of the Holy See" /> <SCRIPT LANGUAGE="JavaScript" SRC="http://www.vatican.va/js/indice.js"></SCRIPT> <TITLE>La Sacra Bibbia - IntraText</TITLE></HEAD><BODY bgcolor="#FFFFFF" TEXT="#000000" link="#663300" vlink="#000000" topmargin="0" background="sfondo.jpg"><BASEFONT SIZE="3"><TABLE border=0 width=100% cellspacing=0 cellpadding=0><TR><TD valign=top rowspan=2 width=69><A HREF=http://www.vatican.va/phome_it.htm><IMG SRC=pkeysixt.jpg border=0 width=69 height=65 alt="La Santa Sede"></A></TD><TD valign=bottom><IMG SRC=vuoto.gif border=0 width=1 height=54 alt="" hspace=0 align=left><br><font size=1 face=Verdana><IMG SRC=vuoto.gif border=0 width=1 height=28 alt="" hspace=0> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href=_INDEX.HTM><b><img alt=back src=back.jpg border=0></b></a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href=http://www.vatican.va/archive/bible/index_it.htm><b><img alt=up src=up.jpg border=0></b></a> &nbsp; &nbsp; <b><a href=_AIUTO.HTM>Aiuto</a></b></font></TD></TR><TR><TD valign=top><hr size=2 noshade></TD></TR></TABLE><table width=100% border=0 cellspacing=3 cellpadding=5><tr><td align=center valign=top bgcolor=#EFD49D><font size=+1>Bibbia CEI</font><br><font size=+2><b></b></font><br><font size=-1></font><br><font size=-2 face=Verdana color=red>IntraText - Lettura del testo</font></td></tr></table><font face=Verdana><font size=1><ul type=square><li>Romani<ul type=square><li>8</li></ul></li></ul></font><center><font size=2><b><a href=__PX4.HTM>Precedente</a></b> - <b><a href=__PX6.HTM>Successivo</a></b></font></center></font><hr size=1><center><font face=verdana size=2><b><a href=_PX5.HTM>Clicca qui per attivare i link alle concordanze</a></b></font></center></font></center><hr size=1 noshade> 8 <br><br><br>[1] Non c'&egrave; dunque pi&ugrave; nessuna condanna per quelli che sono in Cristo Ges&ugrave;. <br><br>[2] Poich&eacute; la legge dello Spirito che d&agrave; vita in Cristo Ges&ugrave; ti ha liberato dalla legge del peccato e della morte. <br><br>[3] Infatti ci&ograve; che era impossibile alla legge, perch&eacute; la carne la rendeva impotente, Dio lo ha reso possibile: mandando il proprio Figlio in una carne simile a quella del peccato e in vista del peccato, egli ha condannato il peccato nella carne, <br><br>[4] perch&eacute; la giustizia della legge si adempisse in noi, che non camminiamo secondo la carne ma secondo lo Spirito. <br><br>[5] Quelli infatti che vivono secondo la carne, pensano alle cose della carne; quelli invece che vivono secondo lo Spirito, alle cose dello Spirito. <br><br>[6] Ma i desideri della carne portano alla morte, mentre i desideri dello Spirito portano alla vita e alla pace. <br><br>[7] Infatti i desideri della carne sono in rivolta contro Dio, perch&eacute; non si sottomettono alla sua legge e neanche lo potrebbero. <br><br>[8] Quelli che vivono secondo la carne non possono piacere a Dio. <br><br>[9] Voi per&ograve; non siete sotto il dominio della carne, ma dello Spirito, dal momento che lo Spirito di Dio abita in voi. Se qualcuno non ha lo Spirito di Cristo, non gli appartiene. <br><br>[10] E se Cristo &egrave; in voi, il vostro corpo &egrave; morto a causa del peccato, ma lo spirito &egrave; vita a causa della giustificazione. <br> [11] E se lo Spirito di colui che ha risuscitato Ges&ugrave; dai morti abita in voi, colui che ha risuscitato Cristo dai morti dar&agrave; la vita anche ai vostri corpi mortali per mezzo del suo Spirito che abita in voi. <br><br>[12] Cos&igrave; dunque fratelli, noi siamo debitori, ma non verso la carne per vivere secondo la carne; <br><br>[13] poich&eacute; se vivete secondo la carne, voi morirete; se invece con l'aiuto dello Spirito voi fate morire le opere del corpo, vivrete. <br><br>[14] Tutti quelli infatti che sono guidati dallo Spirito di Dio, costoro sono figli di Dio. <br><br>[15] E voi non avete ricevuto uno spirito da schiavi per ricadere nella paura, ma avete ricevuto uno spirito da figli adottivi per mezzo del quale gridiamo: &quot;Abb&agrave;, Padre!&quot;. <br><br>[16] Lo Spirito stesso attesta al nostro spirito che siamo figli di Dio. <br><br>[17] E se siamo figli, siamo anche eredi: eredi di Dio, coeredi di Cristo, se veramente partecipiamo alle sue sofferenze per partecipare anche alla sua gloria. <br><br>[18] Io ritengo, infatti, che le sofferenze del momento presente non sono paragonabili alla gloria futura che dovr&agrave; essere rivelata in noi. <br><br>[19] La creazione stessa attende con impazienza la rivelazione dei figli di Dio; <br><br>[20] essa infatti &egrave; stata sottomessa alla caducit&agrave; - non per suo volere, ma per volere di colui che l'ha sottomessa - e nutre la speranza <br><br>[21] di essere lei pure liberata dalla schiavit&ugrave; della corruzione, per entrare nella libert&agrave; della gloria dei figli di Dio. <br><br>[22] Sapppiamo bene infatti che tutta la creazione geme e soffre fino ad oggi nelle doglie del parto; <br><br>[23] essa non &egrave; la sola, ma anche noi, che possediamo le primizie dello Spirito, gemiamo interiormente aspettando l'adozione a figli, la redenzione del nostro corpo. <br><br>[24] Poich&eacute; nella speranza noi siamo stati salvati. Ora, ci&ograve; che si spera, se visto, non &egrave; pi&ugrave; speranza; infatti, ci&ograve; che uno gi&agrave; vede, come potrebbe ancora sperarlo? <br><br>[25] Ma se speriamo quello che non vediamo, lo attendiamo con perseveranza. <br><br>[26] Allo stesso modo anche lo Spirito viene in aiuto alla nostra debolezza, perch&eacute; nemmeno sappiamo che cosa sia conveniente domandare, ma lo Spirito stesso intercede con insistenza per noi, con gemiti inesprimibili; <br><br>[27] e colui che scruta i cuori sa quali sono i desideri dello Spirito, poich&eacute; egli intercede per i credenti secondo i disegni di Dio. <br>[28] Del resto, noi sappiamo che tutto concorre al bene di coloro che amano Dio, che sono stati chiamati secondo il suo disegno. <br><br>[29] Poich&eacute; quelli che egli da sempre ha conosciuto li ha anche predestinati ad essere conformi all'immagine del Figlio suo, perch&eacute; egli sia il primogenito tra molti fratelli; <br><br>[30] quelli poi che ha predestinati li ha anche chiamati; quelli che ha chiamati li ha anche giustificati; quelli che ha giustificati li ha anche glorificati. <br><br>[31] Che diremo dunque in proposito? Se Dio &egrave; per noi, chi sar&agrave; contro di noi? <br><br>[32] Egli che non ha risparmiato il proprio Figlio, ma lo ha dato per tutti noi, come non ci doner&agrave; ogni cosa insieme con lui? <br><br>[33] Chi accuser&agrave; gli eletti di Dio? Dio giustifica. <br><br>[34] Chi condanner&agrave;? Cristo Ges&ugrave;, che &egrave; morto, anzi, che &egrave; risuscitato, sta alla destra di Dio e intercede per noi? <br><br>[35] Chi ci separer&agrave; dunque dall'amore di Cristo? Forse la tribolazione, l'angoscia, la persecuzione, la fame, la nudit&agrave;, il pericolo, la spada? <br><br>[36] Proprio come sta scritto: <br>Per causa tua siamo messi a morte tutto il giorno, <br>siamo trattati come pecore da macello. <br><br>[37] Ma in tutte queste cose noi siamo pi&ugrave; che vincitori per virt&ugrave; di colui che ci ha amati. <br><br>[38] Io sono infatti persuaso che n&eacute; morte n&eacute; vita, n&eacute; angeli n&eacute; principati, n&eacute; presente n&eacute; avvenire, <br><br>[39] n&eacute; potenze, n&eacute; altezza n&eacute; profondit&agrave;, n&eacute; alcun'altra creatura potr&agrave; mai separarci dall'amore di Dio, in Cristo Ges&ugrave;, nostro Signore. <br><center><br><br><hr size=1 width=70%><font face=Verdana size=2><center><b><a href=__PX4.HTM>Precedente</a></b> - <b><a href=__PX6.HTM>Successivo</a></b></center></font></center><center><hr size=1><font face=Arial size=1>Copyright &copy; Conferenza Episcopale Italiana</font></CENTER></BODY></HTML>)

Saluti
Nicola

TimAI2

unread,
Jul 29, 2019, 4:47:13 AM7/29/19
to MIT App Inventor Forum
The html is different for some chapters, so the split text blocks are not finding what they need to work correctly

This makes it difficult to resolve, some conditional blocks (length of text ?) for the style of html in each chapter may help to fix it

e.g.

Romani 8
<hr size=1 noshade> 8 <br><br><br>[1]

Genesi 1
<hr size=1 noshade><br>Genesi<br><br><br>1 <br><br><br>[1]

Nicola Imperati

unread,
Jul 29, 2019, 3:07:50 PM7/29/19
to MIT App Inventor Forum
Ciao Tim, 
quindi dato che l'HTML per alcuni capitoli è diverso; allora gli errori in alcuni capitoli saranno inevitabili?
Saluti
Nicola
Reply all
Reply to author
Forward
0 new messages