Skip to content

Commit

Permalink
Change output folder
Browse files Browse the repository at this point in the history
  • Loading branch information
juanse77 committed Aug 15, 2024
1 parent b5b142e commit d1867d7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
**Plain Text Total Editor** is designed to allow the creation and editing of plain text files. You can create files from scratch or open them in editing mode.

## Application behavior:
The formats it accepts are: TXT, HTML, CSS, JavaScript, JSON, Python, Perl, C, C++, and MarkDown. The application does not perform validations on the structure of the document. Its operation is that of a basic notepad-type editor.
The formats it accepts are: TXT, HTML, CSS, JavaScript, JSON, Python, Perl, C, C++, and MarkDown. The application does not perform validations on the structure of the document. Its operation is that of a basic notepad-type editor. The program can be used in write or read mode activating the 'edit switch'.

## Reading and writting:
The application can read documents in any path accessible from the device. Documents once edited can be saved. The files will be automatically saved in the *Download* folder, taking the name assigned in the application's text field.
During the saving process, the file name extension will be checked. If the extension matches one of those accepted by the application, the file will be stored with that name. If no extension is assigned, or the extension is not supported, the file will be created with a 'txt' extension. If a file with that name already exists, it will be rewritten..
The application can read documents in any path accessible from the device. Documents once edited can be saved. The files will be automatically saved in the *Download/notes* folder, taking the name assigned in the application's text field.
During the saving process, the file name extension will be checked. If the extension matches one of those accepted by the application, the file will be stored with that name. If no extension is assigned, or the extension is not supported, the file will be created with a 'txt' extension. If a file with that name already exists, it will be rewritten.

## License:

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ android {
applicationId "com.totalplaintextreader"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 15
versionName "1.1.13"
versionCode 16
versionName "1.1.14"
}

signingConfigs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,16 @@ class MediaStoreModule(
}

private fun createFileUri(fileName: String): Uri? {
val values =
ContentValues().apply {
put(MediaStore.MediaColumns.DISPLAY_NAME, fileName)
put(MediaStore.MediaColumns.MIME_TYPE, getMimeTypeFromExtension(fileName))
put(MediaStore.MediaColumns.RELATIVE_PATH, Environment.DIRECTORY_DOWNLOADS)
}
val notesFolder = "${Environment.DIRECTORY_DOWNLOADS}/notes"
val values = ContentValues().apply {
put(MediaStore.MediaColumns.DISPLAY_NAME, fileName)
put(MediaStore.MediaColumns.MIME_TYPE, getMimeTypeFromExtension(fileName))
put(MediaStore.MediaColumns.RELATIVE_PATH, notesFolder)
}
return reactContext.contentResolver.insert(MediaStore.Files.getContentUri("external"), values)
}


private fun writeContentToFile(
uri: Uri?,
content: String,
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,15 @@ <h2>Application Behavior:</h2>
The formats it accepts are: TXT, HTML, CSS, JavaScript, JSON, Python, Perl, C, C++, and MarkDown.
The application does not perform validations on the structure of the document.
Its operation is that of a basic notepad-type editor.
The program can be used in write or read mode activating the 'edit switch'.
</p>
</section>

<section>
<h2>Reading and Writting:</h2>
<p>
The application can read documents in any path accessible from the device.
Documents once edited can be saved. The files will be automatically saved in the <i>Download</i> folder,
Documents once edited can be saved. The files will be automatically saved in the <i>Download/notes</i> folder,
taking the name assigned in the application's text field. During the saving process, the file name
extension will be checked.
If the extension matches one of those accepted by the application, the file will be stored with that
Expand Down

0 comments on commit d1867d7

Please sign in to comment.