Skip to content

auberginehill/list-my-apps-template-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

List My Apps Template - Data

OS: Android
Type: A template for an Android app called 'List My Apps'
Language: General (with custom variables) and optionally Windows PowerShell
Description: This template (when run in an Android app called 'List My Apps') creates a list of the apps installed on an Android device in a semi-colon delimited .txt-file. The resulted .txt-file can be imported into Microsoft Excel (as described in the Tutorial Step 10 below) or imported to LibreOffice Calc via Windows Notepad (Tutorial Step 11) or processed directly in Windows PowerShell to convert it to a CSV-file (Tutorial Step 12). The goal is to have a .xlsx or .ods -file as an end product (which itself can be converted to PDF...).
Homepage: https://github.com/auberginehill/list-my-apps-template-data
Version: 1.3
Sources:
Emojis: https://api.github.com/emojis
Descriptions of the variables: http://www.onyxbits.de/faq-page/22#t22n48
Downloads: For instance all_in_one.txt or the same file in three separate parts. Or everything as a .zip-file.

Screenshot

screenshot

Remarks

⚠️
  • List My Apps custom templates consist of three fields ("List header", "Item format" and "List footer"). The template code in this project is divided into three parts, which correspond the fields found in List My Apps' Template Editor as described below:

      Filename Field in List My Apps' Template Editor
      file_header.txt "List header, may be blank"
      body.txt "Item format, may not be blank"
      file_footer.txt "List footer, may be blank"
      all_in_one.txt Contains all the above mentioned three parts in one file.

  • Please include one empty row after "File Header" and "Body" in the List My Apps template (so that the script will write each app on its own row instead of all apps in one row).
  • The resulted .txt-file needs to be further processed in order to create a human readable file.

Tutorial

πŸ“– To open this code with an Android device, for instance:

  1. Create a new template in 'List My Apps' -app's Template Editor by clicking Options (three dots) β†’ Template Editor β†’ Add. [Screenshot]
  2. Type in a name for the template.

      screenshot
  3. Paste all the appropriate template data (the three sections as specified below) to 'List My Apps'. Please include one empty row after "File Header" and "Body" (so that the script will write each app on its own row instead of all apps in one row) and save the template.

  4. After saving the template go back to the 'List My Apps' -app's home screen and select the name that was created in Step 2 from the 'Copy/Share as:' -dropdown menu. Please also select the apps that you'd like to be included in the list. [Screenshot]
  5. 'Run' the 'List My Apps' -app with the new template by copying the app data to Clipboard [Copy] (since direct sharing may not work, if a lot of applications has been installed).
    • There seems to be some kind of a limit, how much data the Android Clipboard can contain. With verbose templates ~200 apps might be the upper limit, but with a simple template, the Android Clipboard clearly is capable of containing considerably more app data.
  6. Open a text editor, such as DroidEdit Free.
  7. Paste the app data (source code generated by 'List My Apps' in Step 5) from Clipboard to the text editor.
    • If nothing happens (no data is pasted to a text editor after a few seconds), try selecting fewer apps in 'List My Apps' and go back to Step 5.
      • Depending on the device some lagging may occur when trying to paste, say ~10000 lines of code.
    • If "old data" gets pasted to a text editor (i.e. "the data that was in the Clipboard before List My Apps' 'Copy to Clipboard' -button was clicked"), try selecting fewer apps in 'List My Apps' and go back to Step 5.
  8. Save the file as a .txt-file, for example as 'Installed_Apps.txt', for example in 'Home/Documents' folder (a filename without any spaces is recommended).
  9. Copy the .txt-file to, for instance, C:\Temp\ -directory in Windows.
  10. Microsoft Excel (Text Import Wizard)
    • On the Data tab of the Ribbon bar, in the Get External Data group, click From Text. Then, in the Import Text File dialog box, double-click the Installed_Apps.txt file.
    • Step 1 of 3: Set the original data type as Delimited, Start import at row 1 and the choose a character set in File origin, which matches the character set in Step 8 (In most cases, the File origin -setting can be left at its default). Click Next.
    • Step 2 of 3. Select semi-colon under Delimiters and make sure all other options are NOT selected, and also that Text qualifier is set to " and click Next.
    • Step 3 of 3: The Column data format can be set individually for each column. The default General setting works fine for most of the fields, but at least the 'Version' column has to be set to Text in order to preserve the original data during the import. Click Finish.
    • Select where the imported cells are placed and click OK.
  11. LibreOffice Calc Paste Special via Windows Notepad
    • After copying the .txt-file to, for instance, C:\Temp\ -directory in Windows (Step 9) open the .txt-file in Windows Notepad, select all text (Ctrl + A) and copy the selection to Windows Clipboard (Ctrl + C).
    • Open LibreOffice Calc and click Edit β†’ Paste Special (Ctrl + Shift + V) and double-click Unformatted Text.
      • Paste Special can also be found as an icon in the toolbar or by right-clicking a cell.
    • Set semi-colon as the Delimiter and make sure all other options are NOT selected, and also that Text qualifier is set to " and start import at row 1 and choose a character set, which matches the character set set in Step 8 (In most cases, the Character set -setting can be left at its default). Click OK.
      • In Excel this procedure can be initiated by clicking the text "Paste" below the paste icon in Home tab of the Ribbon bar and selecting Use Text Import Wizard.
  12. Windows PowerShell
    • After copying the .txt-file to, for instance, C:\Temp\ -directory in Windows (Step 9) open Windows PowerShell. Type the script below and press [Enter] (to convert the .txt-file into a .csv-file with semi-colon as delimiter):
        Import-Csv C:\Temp\Installed_Apps.txt -Delimiter ";" | sort Type,Name | Export-Csv C:\Temp\csvfile.csv -Delimiter ";" -NoTypeInformation -Encoding UTF8
    • Parameters:
        sort Sorting can be adjusted to one's liking by adjusting "sort Type,Name" with approppriate column header names (which are set in the "File Header:" -section).
        -Delimiter Any single character can be used as a delimiter in the exported CSV-file. For tab character as a delimiter, the two character 't -combo might work.
        -NoTypeInformation Without the the NoTypeInformation-parameter the first line of the CSV-file would contain #TYPE followed by the name of the type of the object, and that is not a desired effect here.
        -Encoding The default value is ASCII. The acceptable values for this parameter are:
          Unicode
          UTF7
          UTF8
          ASCII
          UTF32
          BigEndianUnicode
          Default
        -Force If any error messages are detected and you know your're right, use the Force.
        -NoClobber Halts the procedure, if overwriting (replacing the contents) of an existing file is about to happen. By default, if a file exists in the specified path, Export-Csv overwrites the file without warning.
        -Confirm Prompts you for confirmation before running the cmdlet.
    • Further info: https://technet.microsoft.com/en-us/library/hh849932.aspx
  13. Conversion from CSV to .xlsx or .ods should be pretty straightforward with Office apps, such as Microsoft Excel or LibreOffice. A couple of extra Windows PowerShell scripts below:

    • CSV to Excel (in Windows PowerShell)
        $xl = new-object -comobject excel.application
        $xl.visible = $False
        $Workbook = $xl.workbooks.open("C:\Temp\csvfile.csv")
        $Worksheets = $Workbooks.worksheets
        $Workbook.SaveAs("C:\Temp\Excelfile.xlsx",1)
        $Workbook.Saved = $True
        $xl.Quit()

    • Excel to CSV (in Windows PowerShell)
        $xlCSV = 6
        $Excel = New-Object -Com Excel.Application
        $Excel.visible = $False
        $Excel.displayalerts=$False
        $WorkBook = $Excel.Workbooks.Open("C:\Temp\Excelfile.xlsx")
        $Workbook.SaveAs("C:\Temp\process.csv",$xlCSV)
        $Excel.quit()

    • Export-XLXS.ps1 (in Windows PowerShell)
        First: . .\Export-XLXS.ps1
        Then: Get-Command -CommandType Function -Name Export-XLXS
        That gave: CommandType Name Version Source
        ----------- ---- ------- ------
        Function Export-XLXS
        Then: Get-Process | select Name,Id,Handles | Export-XLXS C:\Temp\report.xlsx

    • ConvertCSV-ToExcel.ps1 (in Windows PowerShell)
        First: . .\ConvertCSV-ToExcel.ps1
        Then: Get-Command -CommandType Function -Name ConvertCSV-ToExcel
        That gave: CommandType Name Version Source
        ----------- ---- ------- ------
        Function ConvertCSV-ToExcel
        Then: ConvertCSV-ToExcel -inputfile 'csvfile.csv' -output 'Excelfile.xlsx'

Contributing

Find a bug? Have a feature request? Here is how you can contribute to this project:

contributing Bugs: Submit bugs and help us verify fixes.
Feature Requests: Feature request can be submitted by creating an Issue.
Edit Source Files: Submit pull requests for bug fixes and features and discuss existing proposals.

www

www Template Homepage
List My Apps (Google Play)
List My Apps' homepage
List My Apps' application thread at xda-developers.com
DroidEdit Free (free code editor)
Gitskarios for Github
Github Markdown Previewer
HTMLHint
Text Compare
CSV String Escape
ASCII Art: http://www.figlet.org/ and ASCII Art Text Generator

Related scripts

www List My Apps Template - Table
List My Apps Template - List
List My Apps Template - Pro
List My Apps Template - XML plain
List My Apps Template - XML style
List My Apps Template - JSON

N.B.

❗ Please include one empty row after "File Header" and "Body" in the List My Apps template (so that the script will write each app on its own row instead of all apps in one row).