diff --git a/_posts/2015-09-25-winapp2ini.md b/_posts/2015-09-25-winapp2ini.md index e7f772f..9741fc6 100644 --- a/_posts/2015-09-25-winapp2ini.md +++ b/_posts/2015-09-25-winapp2ini.md @@ -3,7 +3,7 @@ layout: page title: "Winapp2.ini" category: doc date: 2015-09-25 23:38:45 -order: 8 +order: 9 --- BleachBit imports cleaning rules from winapp2.ini files giving Windows users 2400+ additional cleaners (and growing) created by the community. [Piriform does not endorse importing "CCleaner data" into BleachBit](https://www.bleachbit.org/news/ccleaner-asks-bleachbit-remove-winapp2ini-importer). diff --git a/_posts/2018-03-14-troubleshooting.md b/_posts/2018-03-14-troubleshooting.md index 0d408a1..c4f4215 100644 --- a/_posts/2018-03-14-troubleshooting.md +++ b/_posts/2018-03-14-troubleshooting.md @@ -3,7 +3,7 @@ layout: page title: "Troubleshooting" category: doc date: 2018-03-14 21:36:58 -order: 10 +order: 11 --- When something goes wrong, these steps will help you gather information to ask for help or to file a bug report. diff --git a/_posts/cleanerml_v2.0.md b/_posts/cleanerml_v2.0.md new file mode 100644 index 0000000..e597d48 --- /dev/null +++ b/_posts/cleanerml_v2.0.md @@ -0,0 +1,904 @@ +--- +layout: page +title: "CleanerML Version 2.0 Documentation" +category: doc +date: 2019-04-24 16:10:00 +order: 8 +--- + +

CleanerML Version 2.0 Documentation

+ +
+ +### Content of the chapter + +[1.00 **General**](#100-general) +[1.01 Introduction](#101-introduction) +[1.02 The Editor](#102-the-editor) +[1.03 Be pretty](#103-be-pretty) +[1.04 Python & "glob" (Unix style pathname pattern expansion)](#104-python--glob-unix-style-pathname-pattern-expansion) +[1.05 Using Variables](#105-using-variables) +[1.06 Windows Variables](#106-windows-variables) +[1.07 Unix Variables](#107-unix-variables) +[1.08 Example Cleaner](#108-example-cleaner) +[2.00 **Header**](#200-header) +[2.01 First Line](#201-first-line) +[2.02 Copyright & Additional Information](#202-copyright--additional-information) +[2.03 Cleaner Element & ID](#203-cleaner-element--id) +[3.00 **General Structure & Configurations per Cleaner**](#300-general-structure--configurations-per-cleaner) +[3.01 Label Element](#301-label-element) +[3.02 Description Element](#302-description-element) +[3.03 Option Element](#303-option-element) +[3.04 More pretty (Label, Option & Description)](#304-more-pretty-label-option--description) +[3.05 Running Element](#305-running-element) +[3.06 OS dependent parts/Cleaners](#306-os-dependent-partscleaners) +[3.07 Display a Warning](#307-display-a-warning) +[3.08 Define multi-value Variables](#308-define-multi-value-variables) +[4.00 **command="delete"**](#400-commanddelete) +[4.01 command="delete" search="file"](#401-commanddelete-searchfile) +[4.02 command="delete" search="walk.files"](#402-commanddelete-searchwalkfiles) +[4.03 command="delete" search="walk.all"](#403-commanddelete-searchwalkall) +[4.04 command="delete" search="walk.top"](#404-commanddelete-searchwalktop) +[4.05 command="delete" search="glob"](#405-commanddelete-searchglob) +[4.06 Delete the content of a folder but not the folder itself](#407-delete-the-content-of-a-folder-but-not-the-folder-itself) +[4.07 Delete the content of a folder and the folder itself](#407-delete-the-content-of-a-folder-and-the-folder-itself) +[4.08 Delete recursive with regex](#408-delete-recursive-with-regex) +[4.09 command="delete" search="deep"](#409-commanddelete-searchdeep) +[4.10 Summary - Table with deletion use cases](#410-summary---table-with-deletion-use-cases) +[5.00 **Commands for Registry, INI, XML, DBs, run**](#500-commands-for-registry-ini-xml-dbs-run) +[5.01 command="winreg"](#501-commandwinreg) +[5.02 Cleaning a Windows Registry Key/Path with a wildcard at the end](#502-cleaning-a-windows-registry-keypath-with-a-wildcard-at-the-end) +[5.03 command="ini"](#503-commandini) +[5.04 command="xml"](#504-commandxml) +[5.05 command="sqlite.vacuum"](#505-commandsqlitevacuum) +[5.06 command="json"](#506-commandjson) +[5.07 Run an external program](#507-run-an-external-program) +[6.00 **Commands for Browsers**](#600-commands-for-browsers) +[6.01 command="mozilla.url.history"](#601-commandmozillaurlhistory) +[6.02 command="chrome.databases_db"](#602-commandchromedatabases_db) +[6.03 command="chrome.autofill"](#603-commandchromeautofill) +[6.04 command="chrome.history"](#604-commandchromehistory) +[6.05 command="chrome.favicons"](#605-commandchromefavicons) +[6.06 command="chrome.keywords"](#606-commandchromekeywords) +[7.00 **When done**](#700-when-done) +[7.01 Pretty, 2](#701-pretty-2) + +
+ +

1.00 General

+ +
+ +### 1.01 Introduction + +CleanerML was designed and written by Andrew Ziem from BleachBit.org for BleachBit. +But the documentation and the CleanerML files are open and therefor can be used by any program that fulfill the license. +CleanerML is a XML-based markup language to write platform independend system cleaners. +CleanerML is still under development and new features get added. + +[Back to index](#content-of-the-chapter) + +
+ +### 1.02 The Editor + +If you be a Windows User, we recommend you to use Notepad++ as editor of choice! +Notepad++ is Open Source, too and have a wonderfull code highlighting for XML files and therefor your coding experience get much more colored and visual. +Notepad++ is available for download here: https://notepad-plus-plus.org/ + +[Back to index](#content-of-the-chapter) + +
+ +### 1.03 Be pretty + +**Coding style:** +We use the coding style that xmllint (Linux Program) use! (More to xmllint at the end of this docu...) + +**The coding style is:** +- Throw in with two spaces; +- Comments can have multiple lines; +- Comments are done in new lines; +- And no empty lines in code! +- Cleaner and option IDs are written in small letters; +- Underscore is the conventonal delimiter rather than a dash. + +XML files get in repo later formated/tested with xmllint... + +[Back to index](#content-of-the-chapter) + +
+ +### 1.04 Python & "glob" (Unix style pathname pattern expansion) + +According to https://docs.python.org/3/library/glob.html: +The `glob` module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell, [...]. +No tilde expansion is done, but `*`, `?`, and character ranges expressed with `[]` will be correctly matched. [...] +Note that [...] glob treats filenames beginning with a dot (`.`) as special cases. [...] +For a literal match, wrap the meta-characters in brackets. For example, `'[?]'` matches the character `'?'`. + +And now the same a bit more simple: +In *NIX Systems (Linux, Unix, BSD, Darvin, ...) paths and file names can contain special characters like `*` and `?`. +To use now wildcard or interrogation mark for a Windows-like search, we have to use in this cases `glob`! +In the following there will be here and there some cases & examples in the documenation, where `glob` must be used! + +[Back to index](#content-of-the-chapter) + +
+ +### 1.05 Using Variables + +**Use Variables to have the path relative** +You can use Variables (you should!) to have the path relative! + +Writing mostly in Windows with `%windows%` and in Unix with `$unix`... You can use both! + +Where to use them: FOLLOWS !!! Not in `.ini`! + +Read more: +https://docs.bleachbit.org/doc/cleanerml.html + +[Back to index](#content-of-the-chapter) + +
+ +### 1.06 Windows Variables + +BleachBit allows all the normal operating system variables, and it adds some extras. +Read about the normal operating system variables (Environment Variables): +https://en.wikipedia.org/wiki/Environment_variable +https://en.wikipedia.org/wiki/Environment_variable#Default_values + +Special: +Windows itself changes `%ProgramFiles%` for 32-bit processes running in a 64-bit operating system as documented here: +https://docs.microsoft.com/en-us/windows/desktop/winprog64/wow64-implementation-details +Means, BleachBit shows in "Help - System Information" on 686/x64 systems: +os.getenv('ProgramFiles') = C:\Program Files (x86) +os.getenv('ProgramW6432') = C:\Program Files +...and not: +os.getenv('ProgramFiles') = C:\Program Files +os.getenv('ProgramW6432') = C:\Program Files + +Code for a multi-value variable "ProgramFiles", that should handle this case. +Taken from `vuze.xml` from Tobias. +For more information about multi-value variables, look into chapter "3.08 Define multi-value Variables". +` ` +` ` +` %ProgramW6432%\Vuze` +` ` +` %ProgramFiles(x86)%\Vuze` +` ` +` %ProgramFiles%\Vuze` +` ` +` ` +` ` + +Extra Variables: +On Windows, BleachBit defines `%cd%` (current directory), `%commonappdata%`, `%documents%`, `%localappdata%` (Windows XP), `%music%`, `%pictures%`, `%video%`, `%localappdatalow%`. + +[Back to index](#content-of-the-chapter) + +
+ +### 1.07 Unix Variables + +FOLLOWS !!! + +Extra Variables: +On Unix, BleachBit defines `$XDG_CONFIG_HOME`, `$XDG_CACHE_HOME`, ... +For more look here: https://wiki.archlinux.org/index.php/XDG_Base_Directory + +[Back to index](#content-of-the-chapter) + +
+ +### 1.08 Example Cleaner + +Here is an example cleaner: +https://github.com/bleachbit/bleachbit/blob/master/doc/example_cleaner.xml + +[Back to index](#content-of-the-chapter) + +
+ +

2.00 Header

+ +
+ +### 2.01 First Line + +The first line in a new cleaner file is always ``. +This identifies the file as a XML file. +CleanerML files are a special version of XML files. + +[Back to index](#content-of-the-chapter) + +
+ +### 2.02 Copyright & Additional Information + +Your cleaners should retain the copyright and information header found in `release/*.xml`. Please edit the copyright information accordingly. +If needed, you can also include extra maintenance information in the header, as found in [release/openshot.xml](https://github.com/az0/cleanerml/blob/master/openshot.xml): + + @url http://full.url.of/software-project + @tested ok softwareversion, OSnameandversion + @note Some notes for cleaner maintainers + +**Example for a other version:** + + @app Double Commander + @url https://doublecmd.sourceforge.io/ + @os Windows, Linux, FreeBSD + @cleanerversion v0.2.5 + @cleanerdate 2019-03-11 + @cleanerby https://github.com/Tobias-B-Besemer + @tested ok v0.8.4, Windows 7 + @testeddate 2019-03-11 + @testedby https://github.com/Tobias-B-Besemer + @note As long we have no command="xml", we need to delete the complete file! + +[Back to index](#content-of-the-chapter) + +
+ +### 2.03 Cleaner Element & ID + +The cleaner starts with the `` element. +Example for a `` header: `` +`id` is the BleachBit internal ID of the cleaner. + +`` can define that the cleaner is OS dependent. +For more information to this look at: OS dependent parts/cleaners + +[Back to index](#content-of-the-chapter) + +
+ +

3.00 General Structure & Configurations per Cleaner

+ +
+ +### 3.01 Label Element + +After that comes `