Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
NEXTAltair committed Oct 7, 2024
1 parent cc74f11 commit 8295551
Show file tree
Hide file tree
Showing 17 changed files with 336 additions and 105 deletions.
Binary file modified .doctrees/caption_tags.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/module.db.doctree
Binary file not shown.
4 changes: 3 additions & 1 deletion _modules/DatasetExportWidget.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ <h1>DatasetExportWidget のソースコード</h1><div class="highlight"><pre>
<span class="n">resolution</span> <span class="o">=</span> <span class="n">filter_conditions</span><span class="p">[</span><span class="s1">&#39;resolution&#39;</span><span class="p">]</span>
<span class="n">use_and</span> <span class="o">=</span> <span class="n">filter_conditions</span><span class="p">[</span><span class="s1">&#39;use_and&#39;</span><span class="p">]</span>
<span class="n">start_date</span><span class="p">,</span> <span class="n">end_date</span> <span class="o">=</span> <span class="n">filter_conditions</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;date_range&#39;</span><span class="p">,</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">include_untagged</span><span class="o">=</span><span class="n">filter_conditions</span><span class="p">[</span><span class="s1">&#39;include_untagged&#39;</span><span class="p">]</span>
<span class="c1"># 日付範囲の処理</span>
<span class="k">if</span> <span class="n">start_date</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">end_date</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="c1"># UTCタイムスタンプをQDateTimeに変換し、ローカルタイムゾーンに設定</span>
Expand All @@ -112,7 +113,8 @@ <h1>DatasetExportWidget のソースコード</h1><div class="highlight"><pre>
<span class="n">resolution</span><span class="o">=</span><span class="n">resolution</span><span class="p">,</span>
<span class="n">use_and</span><span class="o">=</span><span class="n">use_and</span><span class="p">,</span>
<span class="n">start_date</span><span class="o">=</span><span class="n">start_date</span><span class="p">,</span>
<span class="n">end_date</span><span class="o">=</span><span class="n">end_date</span>
<span class="n">end_date</span><span class="o">=</span><span class="n">end_date</span><span class="p">,</span>
<span class="n">include_untagged</span><span class="o">=</span><span class="n">include_untagged</span>
<span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">filtered_image_metadata</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">filter_type</span><span class="si">}</span><span class="s2"></span><span class="si">{</span><span class="n">filter_text</span><span class="si">}</span><span class="s2"> を含む検索結果がありません&quot;</span><span class="p">)</span>
Expand Down
6 changes: 3 additions & 3 deletions _modules/ImageEditWidget.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ <h1>ImageEditWidget のソースコード</h1><div class="highlight"><pre>
<span class="n">existing_annotations</span> <span class="o">=</span> <span class="n">ImageAnalyzer</span><span class="o">.</span><span class="n">get_existing_annotations</span><span class="p">(</span><span class="n">file_path</span><span class="p">)</span>
<span class="k">if</span> <span class="n">existing_annotations</span><span class="p">:</span>
<span class="c1"># タグをカンマ区切りの文字列に結合</span>
<span class="n">tags_str</span> <span class="o">=</span> <span class="s1">&#39;, &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">existing_annotations</span><span class="p">[</span><span class="s1">&#39;tags&#39;</span><span class="p">])</span>
<span class="n">tags_str</span> <span class="o">=</span> <span class="s1">&#39;, &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">tag_info</span><span class="p">[</span><span class="s1">&#39;tag&#39;</span><span class="p">]</span> <span class="k">for</span> <span class="n">tag_info</span> <span class="ow">in</span> <span class="n">existing_annotations</span><span class="p">[</span><span class="s1">&#39;tags&#39;</span><span class="p">]])</span>
<span class="bp">self</span><span class="o">.</span><span class="n">tableWidgetImageList</span><span class="o">.</span><span class="n">setItem</span><span class="p">(</span><span class="n">row_position</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="n">QTableWidgetItem</span><span class="p">(</span><span class="n">tags_str</span><span class="p">))</span>

<span class="c1"># キャプションをカンマ区切りの文字列に結合</span>
<span class="n">captions_str</span> <span class="o">=</span> <span class="s1">&#39;, &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">existing_annotations</span><span class="p">[</span><span class="s1">&#39;captions&#39;</span><span class="p">])</span>
<span class="n">captions_str</span> <span class="o">=</span> <span class="s1">&#39;, &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">caption_info</span><span class="p">[</span><span class="s1">&#39;caption&#39;</span><span class="p">]</span> <span class="k">for</span> <span class="n">caption_info</span> <span class="ow">in</span> <span class="n">existing_annotations</span><span class="p">[</span><span class="s1">&#39;captions&#39;</span><span class="p">]])</span>
<span class="bp">self</span><span class="o">.</span><span class="n">tableWidgetImageList</span><span class="o">.</span><span class="n">setItem</span><span class="p">(</span><span class="n">row_position</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="n">QTableWidgetItem</span><span class="p">(</span><span class="n">captions_str</span><span class="p">))</span>

<div class="viewcode-block" id="ImageEditWidget.on_tableWidgetImageList_itemSelectionChanged">
Expand Down Expand Up @@ -218,7 +218,7 @@ <h1>ImageEditWidget のソースコード</h1><div class="highlight"><pre>
<div class="viewcode-block" id="ImageEditWidget.process_image">
<a class="viewcode-back" href="../ImageEditWidget.html#ImageEditWidget.ImageEditWidget.process_image">[ドキュメント]</a>
<span class="k">def</span> <span class="nf">process_image</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">image_file</span><span class="p">:</span> <span class="n">Path</span><span class="p">):</span>
<span class="n">image_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">idm</span><span class="o">.</span><span class="n">get_image_id_by_name</span><span class="p">(</span><span class="n">image_file</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
<span class="n">image_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">idm</span><span class="o">.</span><span class="n">detect_duplicate_image</span><span class="p">(</span><span class="n">image_file</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">image_id</span><span class="p">:</span>
<span class="n">image_id</span><span class="p">,</span> <span class="n">original_image_metadata</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">idm</span><span class="o">.</span><span class="n">register_original_image</span><span class="p">(</span><span class="n">image_file</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">fsm</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
Expand Down
Loading

0 comments on commit 8295551

Please sign in to comment.