Skip to content

Commit

Permalink
moving OCR buttona and other minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinodh Rajan committed May 12, 2024
1 parent 9b991a9 commit d0ad99d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 26 deletions.
2 changes: 1 addition & 1 deletion aksharamukha-front/src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<q-item-main label="Semitic Scripts"/>
</q-item>
<q-item to="/loc">
<q-item-main label="Library of Congres"/>
<q-item-main label="Library of Congress"/>
</q-item>
</q-collapsible>
<!-- <q-item :to="!scriptSemiticList.includes(script.value) ? '/describe/' + script.value : '/describesemitic/' + script.value"
Expand Down
42 changes: 21 additions & 21 deletions aksharamukha-front/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,8 @@
<q-icon name="history" size="25px" v-show="inputPast !== ''" class="print-hide"/>
</div>
<q-btn class="q-ma-sm q-mt-md btn2 print-hide col-xs-1 col-md-1" @click="copySource" :data-clipboard-text="textInput.replace(/<br\/>/g, '\n')"> <q-icon name="file_copy" /><q-tooltip>Copy source text</q-tooltip></q-btn>
<input-options :inputScript="inputScript" :outputScript="outputScript" :preOptionsInput="preOptions" :showscriptName="false"
:postOptions="postOptions" v-model="preOptions" @input="convert"></input-options>
<q-input
v-model.trim="textInput"
type="textarea"
float-label="Input text"
class="text-input col-xs-12 col-md-12 q-ma-sm"
:class="getInputClass(inputScript, preOptions)"
autofocus
@input="throttled"
clearable
color="dark"
rows="10"
:max-height="1500"
@clear="OCRPerformed = false"
></q-input>
<input-notice :inputScript="inputScript" :outputScript="outputScript" :preOptions="preOptions"
:postOptions="postOptions" :OCRPerformed="OCRPerformed"></input-notice>
<div class="">
<q-btn class="q-ma-sm print-hide col-xs-3 col-md-3" @click="uploadImage" label="Use Image/PDF" v-show="displayImageButton" v-if="!$q.platform.is.cordova" icon="add photo alternate"> <q-tooltip>Upload image/PDF</q-tooltip></q-btn>
<q-btn class="q-ma-sm q-mt-md btn2 print-hide col-xs-1 col-md-1" @click="uploadImage" :data-clipboard-text="textInput.replace(/<br\/>/g, '\n')"> <q-icon name="add photo alternate" /><q-tooltip>Upload image/PDF</q-tooltip></q-btn>
<div class="">
<span v-show="showFileUpload" class="q-ma-sm">
<q-uploader url="" clearable extensions=".jpg, .jpeg, .png, .bmp, .ico, .pdf" @add="showConvertImage" @remove:cancel="hideConvertButton"
auto-expand hide-upload-button ref="uploadF" :style="{width:'200px'}"/>
Expand All @@ -75,6 +57,24 @@
</span>
</span>
</div>
<input-options :inputScript="inputScript" :outputScript="outputScript" :preOptionsInput="preOptions" :showscriptName="false"
:postOptions="postOptions" v-model="preOptions" @input="convert"></input-options>
<q-input
v-model.trim="textInput"
type="textarea"
float-label="Input text"
class="text-input col-xs-12 col-md-12 q-ma-sm"
:class="getInputClass(inputScript, preOptions)"
autofocus
@input="throttled"
clearable
color="dark"
rows="10"
:max-height="1500"
@clear="OCRPerformed = false"
></q-input>
<input-notice :inputScript="inputScript" :outputScript="outputScript" :preOptions="preOptions"
:postOptions="postOptions" :OCRPerformed="OCRPerformed"></input-notice>
</div>
<div class="q-ma-md print-hide">
<div class="col">
Expand All @@ -100,7 +100,7 @@
</div>
<div class="q-mt-sm"><output-buttons @fontsizeinc="fontSize += 20" @fontsizedec="fontSize -= 20"
@printdoc="printDocument" @screenshot="imageConvert(downloadImage.bind(this))" @copytext="copy" :convertText="convertText" :content="downHTML"></output-buttons></div>
<q-btn icon="share" label="text" class="q-ma-sm" @click="shareCordovaText" v-if="$q.platform.is.cordova"/> <q-btn icon="share" label="image" class="q-ma-sm" @click="imageConvert(shareCordovaImage.bind(this))" v-if="$q.platform.is.cordova" />
<!-- <q-btn icon="share" label="text" class="q-ma-sm" @click="shareCordovaText" v-if="$q.platform.is.cordova"/> <q-btn icon="share" label="image" class="q-ma-sm" @click="imageConvert(shareCordovaImage.bind(this))" v-if="$q.platform.is.cordova" /> -->
<output-options :inputScript="inputScript" :outputScript="outputScript" :postOptionsInput="postOptions" :sourcePreserveInput="sourcePreserve" :showscriptName="false"
:convertText="convertText" :hideSourcePreserve="false"
@input="convertOutputOptions($event)" ></output-options>
Expand Down
2 changes: 1 addition & 1 deletion aksharamukha-front/src/pages/loc.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<q-page padding>
<h4>Library of Congresss Romanization <q-spinner-comment color="dark" :size="30" v-show="loading"/> </h4>
<h4>Library of Congress Romanization <q-spinner-comment color="dark" :size="30" v-show="loading"/> </h4>
<div class="q-body-1">The romanization of the supported scripts (as shown below) follow the guidelines of the Library of Congress as much as possible (unless they involve subjective reading of certain sequences and/or require lexical context). </div> <br/>

<div class="q-body-1">Please not that many LoC romanization schemes are not reversible. Transliterating the source script from an LoC scheme, depending upon the script, may not always give the exact original source text back. </div> <br/>
Expand Down
4 changes: 1 addition & 3 deletions aksharamukha-front/src/pages/python.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<td>Various options that customize the transliteration output. An array of strings, the strings being the various options.</td>
</tr>
</table> <br/>

<p class="q-body-1">All script identifiers and the various flags for Pre- and Post-Options are listed in detail <router-link to='/documentation'>here</router-link> along with their description.</p>
<hr/> <br/>

<span class="code">transliterate.process('HK', 'Telugu', 'buddhaH')</span> <br/> <br/>
Expand Down Expand Up @@ -78,8 +78,6 @@
<span class="code">transliterate.process('autodetect', 'pa-arab', 'धर्म भारत की ', param="script_code")</span> <br/><br/>
<span class="code">transliterate.process('la-HK', 'pa-guru', 'namo buddhAya', param="lang_code")</span> <br/><br/>

<p class="q-body-1">All script identifiers and the various flags for Pre- and Post-Options are listed in detail <router-link to='/documentation'>here</router-link> along with their description.</p>

<p class="q-body-1">You can also convert files (.docx, .html & .txt) as shown below.</p>
<span class="code"> from aksharamukha import transliterate_file</span> <br/><br/>
<span class="code"> transliterate_file.process(src, tgt, file_path, nativize=True, pre_options=[], post_options=[])</span> <br/><br/>
Expand Down

0 comments on commit d0ad99d

Please sign in to comment.